package com.dp.builder.exp1.director;

import com.dp.builder.exp1.builder.Builder;
import com.dp.builder.exp1.product.Bike;

/**
 * @Author: Ruomeng
 * @Date: 2024/11/27
 * @Description : design-pattern
 * 指挥者
 * @Version: 1.0
 */
public class Director {

    private Builder mBuilder;

    public Director(Builder mBuilder) {
        this.mBuilder = mBuilder;
    }

    // 构造单车
    public Bike construct() {
        mBuilder.buildFrame();
        mBuilder.buildSeat();
        return mBuilder.createBike();
    }

}
